﻿using Entity.PointsActivety;
using System.ComponentModel.DataAnnotations;

namespace Dto;

/// <summary>
/// 编辑排队活动
/// </summary>
public class EditPointsActiveDto
{
    /// <summary>
    /// 活动名称
    /// </summary>
    [Required(ErrorMessage = "请输入活动名称")]
    public string Name { get; set; } = "";

    /// <summary>
    /// 商品图
    /// </summary>
    [SugarColumn(IsJson = true, ColumnDataType = "text")]
    public string[]? Images { get; set; }

    /// <summary>
    /// 活动描述
    /// </summary>
    [Required(ErrorMessage = "请输入活动描述")]
    public string Description { get; set; } = "";

    /// <summary>
    /// 分佣比例 如3-7分
    /// </summary>
    [Required(ErrorMessage = "请选择分佣比例")]
    public string RadioName { get; set; } = "";

    /// <summary>
    /// 进入资金池的比例 如0.3
    /// </summary>
    [Required(ErrorMessage = "请输入分佣比例")]
    [Range(minimum: 0.1, maximum: 0.9, ErrorMessage = "分佣比例最小0.1 最大0.9")]
    public decimal Radio { get; set; }

    public int Id { get; set; }

    /// <summary>
    /// 活动状态
    /// </summary>
    public PointsActivityStatus Status { get; set; } = PointsActivityStatus.进行中;
}
